<template>
  <div id="app">
    <div>
      <h1>版本号:
        {{version}}
      </h1>
      <div class="carts" v-if="env==='development'">
        <Carts></Carts>
      <hr>
      <Products></Products>
      </div>
      
      <comment v-else></comment>
      <selectCom></selectCom>
    </div>
  </div>
</template>
<script>

//需求：

//1.yarn serve的时候 展示的是购物车的界面

//yarn comment 展示评论的页面

//3.评论页面的端口设置为0806

import Carts from "@/components/Carts"
import Products from "@/components/Products"
import "assets/test.css"
import comment from "components/comment"
import selectCom from "components/select"
  export default{
    data(){
      return{
        version:"",
        env:"develoment"
      }
    },
    created(){
      console.log(process.env)
      this.version = process.env.VUE_APP_VERSION
      this.env=process.env.NODE_ENV
    },
    components:{
      Carts,
      Products,
      comment,
      selectCom
    },
  }
</script>